package com.mxwl.cbg.common.model.source.role;

import lombok.Data;

import java.util.Collections;
import java.util.List;
import java.util.Map;

@Data
public abstract class Child {
    private int iRes_all;
    private int iStr_all;
    private int ending;
    private int gg;
    private int iAtt_F;
    private int iMp_max;
    private int iType;
    private int lm;
    private int att_rate;
    private int iBaobao;
    private int change_598_times;
    private int life;
    private int iMag_all;
    private int hp;
    private int iMagDef_all;
    private int iSpe_all;
    private List<?> avatar_info;
    private int desc;
    private Map<String, Integer> all_skills;
    private int school;
    private int iMagDam_all;
    private int mp;
    private int iCor_all;
    private int def;
    private int zl;
    private int iAtt_all;
    private int dl;
    private int iGrade;
    private int iDex_All;
    private int spe;
    private int nl;
    private int iDef_All;
    private int iPoint;
    private int iHp;
    private int ruyidan;
    private int yuanxiao;
    private int wl;
    private int qianjinlu;
    private int child_sixwx;
    private int iHp_max;
    private int grow;
    private int iDod_All;
    private int iMp;
    private int isnew;
    private int dod;
    private int att;

    public void setAll_skills(Object value) {
        if (value instanceof Map) {
            this.all_skills = (Map<String, Integer>) value;
        } else {
            // 忽略非法值或设置为空 map
            this.all_skills = Collections.emptyMap();
        }
    }

    public Map<String, Integer> getAll_skills() {
        return all_skills == null ? Collections.emptyMap() : all_skills;
    }
}
